<!doctype html>
<!--
@license
Copyright 2018 Google Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
  <title>tabs demo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script  src="../node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
  <script type="module" src="../node_modules/@material/mwc-tab/mwc-tab.js"></script>
  <script type="module" src="../node_modules/@material/mwc-tab-bar/mwc-tab-bar.js"></script>
  <script type="module" src="../node_modules/@material/mwc-icon/mwc-icon.js"></script>
  <link rel="stylesheet" href="demo-component.css">
  <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet">
  <style>
    iframe {
      border: 1px solid gray;
      height: 380px;
      width: 100%;
    }
  </style>
</head>
<body class="unresolved">
  <header>
    <a href="index.html"><mwc-icon>arrow_back</mwc-icon>
    <span>Tabs</span></a>
  </header>

  <main>

    <mwc-tab-bar>
      <mwc-tab label="one"></mwc-tab>
      <mwc-tab label="two"></mwc-tab>
      <mwc-tab label="three"></mwc-tab>
    </mwc-tab-bar>

    <h3>Fading indicator</h3>
    <mwc-tab-bar>
      <mwc-tab label="one" isFadingIndicator></mwc-tab>
      <mwc-tab label="two" isFadingIndicator></mwc-tab>
      <mwc-tab label="three" isFadingIndicator></mwc-tab>
    </mwc-tab-bar>

    <h3>Min Width Tab</h3>
    <mwc-tab-bar>
      <mwc-tab label="one" minWidth></mwc-tab>
      <mwc-tab label="two" minWidth></mwc-tab>
      <mwc-tab label="three" minWidth></mwc-tab>
    </mwc-tab-bar>

    <h3>Min Width Indicator</h3>
    <mwc-tab-bar>
      <mwc-tab label="one" isMinWidthIndicator></mwc-tab>
      <mwc-tab label="two" isMinWidthIndicator></mwc-tab>
      <mwc-tab label="three" isMinWidthIndicator></mwc-tab>
    </mwc-tab-bar>

    <h3>Min Width Tab - Min Width Indicator</h3>
    <mwc-tab-bar>
      <mwc-tab label="one" minWidth isMinWidthIndicator></mwc-tab>
      <mwc-tab label="two" minWidth isMinWidthIndicator></mwc-tab>
      <mwc-tab label="three" minWidth isMinWidthIndicator></mwc-tab>
    </mwc-tab-bar>

    <h3>With Icons</h3>
    <mwc-tab-bar activeIndex="2">
      <mwc-tab label="one" icon="accessibility"></mwc-tab>
      <mwc-tab label="two" icon="exit_to_app"></mwc-tab>
      <mwc-tab label="three" icon="camera"></mwc-tab>
    </mwc-tab-bar>

    <h3>Only Icons</h3>
    <mwc-tab-bar activeIndex="2">
      <mwc-tab icon="accessibility"></mwc-tab>
      <mwc-tab icon="exit_to_app"></mwc-tab>
      <mwc-tab icon="camera"></mwc-tab>
    </mwc-tab-bar>

    <h3>Image Icons</h3>
    <mwc-tab-bar activeIndex="2">
      <mwc-tab hasImageIcon>
        <svg width="10px" height="10px">
          <circle
              r="5px"
              cx="5px"
              cy="5px"
              color="red">
          </circle>
        </svg>
      </mwc-tab>
      <mwc-tab hasImageIcon>
        <svg width="10px" height="10px">
          <rect
              width="10px"
              height="10px"
              color="green">
          </rect>
        </svg>
      </mwc-tab>
      <mwc-tab hasImageIcon>
        <svg width="14.143px" height="14.143px">
          <rect
              width="10px"
              height="10px"
              color="blue"
              y="2.071px"
              x="2.071px"
              style="transform:rotate(45deg);transform-origin:center;">
          </rect>
        </svg>
      </mwc-tab>
    </mwc-tab-bar>

    <h3>With Icons - Stacked</h3>
    <mwc-tab-bar activeIndex="1">
      <mwc-tab label="one" icon="accessibility" stacked></mwc-tab>
      <mwc-tab label="two" icon="exit_to_app" stacked></mwc-tab>
      <mwc-tab label="three" icon="camera" stacked></mwc-tab>
    </mwc-tab-bar>

    <h3>With Icons - Stacked - Min Width Indicator</h3>
    <mwc-tab-bar>
      <mwc-tab label="one" icon="accessibility" stacked isMinWidthIndicator></mwc-tab>
      <mwc-tab label="two" icon="exit_to_app" stacked isMinWidthIndicator></mwc-tab>
      <mwc-tab label="three" icon="camera" stacked isMinWidthIndicator></mwc-tab>
    </mwc-tab-bar>

    <h3>Scrolling</h3>
    <mwc-tab-bar>
      <mwc-tab label="one"></mwc-tab>
      <mwc-tab label="two"></mwc-tab>
      <mwc-tab label="three"></mwc-tab>
      <mwc-tab label="four"></mwc-tab>
      <mwc-tab label="five"></mwc-tab>
      <mwc-tab label="six"></mwc-tab>
      <mwc-tab label="seven"></mwc-tab>
      <mwc-tab label="eight"></mwc-tab>
      <mwc-tab label="nine"></mwc-tab>
      <mwc-tab label="ten"></mwc-tab>
    </mwc-tab-bar>

    <h3>Scrolling - Width Icons - Stacked - Min Width Indicator</h3>
    <mwc-tab-bar>
      <mwc-tab label="one" icon="camera" stacked isMinWidthIndicator></mwc-tab>
      <mwc-tab label="two" icon="camera" stacked isMinWidthIndicator></mwc-tab>
      <mwc-tab label="three" icon="camera" stacked isMinWidthIndicator ></mwc-tab>
      <mwc-tab label="four" icon="camera" stacked isMinWidthIndicator></mwc-tab>
      <mwc-tab label="five" icon="camera" stacked isMinWidthIndicator></mwc-tab>
      <mwc-tab label="six" icon="camera" stacked isMinWidthIndicator></mwc-tab>
      <mwc-tab label="seven" icon="camera" stacked isMinWidthIndicator></mwc-tab>
      <mwc-tab label="eight" icon="camera" stacked isMinWidthIndicator></mwc-tab>
      <mwc-tab label="nine" icon="camera"  stacked isMinWidthIndicator></mwc-tab>
      <mwc-tab label="ten" icon="camera" stacked isMinWidthIndicator></mwc-tab>
    </mwc-tab-bar>

    <h3>Icon indicator</h3>
    <mwc-tab-bar>
      <mwc-tab icon="camera" isFadingIndicator indicatorIcon="donut_large"></mwc-tab>
      <mwc-tab icon="accessibility" isFadingIndicator indicatorIcon="donut_large"></mwc-tab>
      <mwc-tab icon="exit_to_app" isFadingIndicator indicatorIcon="donut_large"></mwc-tab>
    </mwc-tab-bar>

    <h3>RTL</h3>
    <iframe src="tabs/rtl.html"></iframe>
  </main>

  <script>
    addEventListener('load', function() { document.body.classList.remove('unresolved'); });
  </script>
</body>
</html>
